package cn.wangchao.basic.util;

import lombok.Data;

@Data
public class AjaxResult {
    private boolean success = true;
    private String message = "操作成功";
    //返回额外参数
    private Object resultObj;

    public static AjaxResult my(){
        return new AjaxResult();
    }
    public AjaxResult setSuccess(boolean success) {
        this.success = success;
        return this;
    }

    public AjaxResult setMessage(String message) {
        this.message = message;
        return this;
    }

    public AjaxResult setResultObj(Object resultObj) {
        this.resultObj = resultObj;
        return this;
    }

}
